<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>递归求斐波那契数列</title>
		<script type="text/javascript">
			//斐波那契数列(兔子数列) 第n个数值等于前两个数字相加的和
			function fn(n) {
				//递归函数一定要添加退出条件 return 
				if(n == 1 || n == 2) {
					return 1;
				}
				return fn(n - 1) + fn(n - 2);
			}
			
			//求第三个斐波那契数列的值
			console.log(fn(4));
			var lis = [
				{
					name:'[张三,李四]'
				}
			]
			
			console.log(JSON.parse(lis[0].name));
			
		</script>
	</head>
	<body>
	</body>
</html>
